﻿using System;
using System.Collections.Generic;

namespace IOA.MES.DataAccess.VModel
{
    /// <summary>
    /// 入库检
    /// </summary>
    public class VInboundInspect : BaseVModel
    {
        private string _refuseReason;
        private string _packBatchNo;
        private string _packNo;

        ///<Summary>
        /// 打包批次号
        ///</Summary>
        public string PackBatchNo
        {
            get { return string.IsNullOrWhiteSpace(_packBatchNo) ? string.Empty : _packBatchNo; }
            set { _packBatchNo = value; }
        }

        ///<Summary>
        /// 打包编号
        ///</Summary>
        public string PackNo
        {
            get { return string.IsNullOrWhiteSpace(_packNo) ? string.Empty : _packNo; }
            set { _packNo = value; }
        }

        ///<Summary>
        /// 检核人
        ///</Summary>
        public int InspectBy { get; set; }

        ///<Summary>
        /// 检核时间
        ///</Summary>
        public DateTime? InspectTime { get; set; }

        ///<Summary>
        /// 检核状态
        ///</Summary>
        public Enum.PackInboundInspectStatus Status { get; set; }

        ///<Summary>
        /// 决绝原因
        ///</Summary>
        public string RefuseReason
        {
            get { return string.IsNullOrWhiteSpace(_refuseReason) ? string.Empty : _refuseReason; }
            set { _refuseReason = value; }
        }

        /// <summary>
        /// ERP入库任务是否已添加
        /// </summary>
        public bool ErpTaskExcuted { get; set; } = false;

        ///<Summary>
        /// 检核状态
        ///</Summary>
        public string CNStatus
        {
            get { return !System.Enum.IsDefined(typeof(Enum.PackInboundInspectStatus), Status) ? string.Empty : EnumConvert.ToDesc(Status); }
        }

        /// <summary>
        /// 入库检产品列表
        /// </summary>
        public List<VInboundInspectProduct> Products { get; set; } = new List<VInboundInspectProduct>();
    }
}
